<template>
	<ul class="todo-main">
		<!-- :todo="todo想要将数据传输给子组件。就在子组件的标签上设置属性（最好是v-bind绑定，这样就是表达式传递，可以传递对象 -->
		<MyItem v-for="todo in todos" :key="todo.id" :todo="todo">
		</MyItem>
	</ul>
</template>

<script>
import MyItem from './MyItem.vue';

export default {
	name: "MyList",
	components: {
		MyItem
	},
	props: ["todos"]

}
</script>

<style scoped>
/*main*/
.todo-main {
	margin-left: 0px;
	border: 1px solid #ddd;
	border-radius: 2px;
	padding: 0px;
	overflow: auto;
}

.todo-empty {
	height: 40px;
	line-height: 40px;
	border: 1px solid #ddd;
	border-radius: 2px;
	padding-left: 5px;
	margin-top: 10px;
}
</style>